﻿using System;
using System.Collections.Generic;
using System.Linq;
using ClassLibrary;


namespace HinduShop.Domain.Models.Account
{
    public class User
    {
        public virtual int Id { get; set; }
        public virtual string UserName { get; set; }
        public virtual string ApplicationName { get; set; }
        public virtual string Email { get; set; }

        public virtual string Comment { get; set; }
        public virtual string PasswordHash { get; set; }

        public virtual DateTime CreationDate { get; set; }

        private RolesEnum roles = RolesEnum.User;

        public virtual RolesEnum Roles { get { return roles; } } 

        public virtual void AddRole(RolesEnum role)
        {
            roles = roles | role;
        }

        public virtual void RemoveRole(RolesEnum role)
        {
            roles &= ~role;
        }
    }
}
